namespace EntLibEC.Shopping.Include
{
	using System;
	using System.Data;
	using System.Drawing;
	using System.Web;
	using System.Web.UI.WebControls;
	using System.Web.UI.HtmlControls;

	using EntLibEC.Cmn;
	using EntLibEC.Biz;

	/// <summary>
	///		Summary description for Gendor.
	/// </summary>
	public partial class Gendor : System.Web.UI.UserControl
	{

		protected void Page_Load(object sender, System.EventArgs e)
		{
			// Put user code to initialize the page here
		}

		public void BindGendor(bool isAll)
		{
			ddlStatus.Items.Clear();
			ddlStatus.DataSource = AppEnum.GetGendor();
			ddlStatus.DataValueField = "key";
			ddlStatus.DataTextField = "value";
			ddlStatus.DataBind();
            ddlStatus.SelectedValue = "1";
			if ( isAll )
				ddlStatus.Items.Insert( 0,new ListItem(AppConst.AllSelectString,AppConst.IntNull.ToString()) );
		}


		public int GendorSysNo
		{
			get
			{
				return Convert.ToInt32(ddlStatus.SelectedItem.Value);
			}
			set
			{
				ddlStatus.SelectedIndex = ddlStatus.Items.IndexOf(ddlStatus.Items.FindByValue(value.ToString()) );
			}
		}
	}
}
